//
//  S1mpl3ClassifyCollectionViewCell.m
//  沙哈拉FM
//
//  Created by dllo on 15/11/4.
//  Copyright © 2015年 S1mpl3. All rights reserved.
//

#import "S1mpl3ClassifyCollectionViewCell.h"
#import "FitHeader.h"
#import "Model.h"

@implementation S1mpl3ClassifyCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
        [self changeColor];
    }
    return self;
}

-(void)changeColor{
    self.backgroundColor = [Model shareInstance].ViewColor;
}

- (void)createView{
    _coverPathImageView = [[UIImageView alloc]init];
    //    _coverPathImageView.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:_coverPathImageView];
    
    _label = [[BaseLabel alloc]init];
    [_label setFontSize:18];
    _label.text = @"查看更多分类";
    //    _titleTopLabel.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:_label];
    
}

- (void)layoutSubviews{
    [super layoutSubviews];
    _coverPathImageView.frame = CGRectMake(10 * FITWidth, 5 * FITHeight, 32 * FITWidth, 32 * FITHeight);
    _coverPathImageView.image = [UIImage imageNamed:@"分类"];
    _label.frame = CGRectMake(_coverPathImageView.frame.origin.x + _coverPathImageView.frame.size.width + 10 * FITWidth, _coverPathImageView.frame.origin.y, self.contentView.frame.size.width - _coverPathImageView.frame.size.width - 20 * FITWidth, 30 * FITHeight);
    
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
